﻿
using SanJ.FreeCare.Peis.Configure.Student;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace SanJ.FreeCare.Peis
{
    public partial class PeisAppService : FreeCareAppService,IPeisAppService
    {
        public  Task<PagedResultDto<StudentDto>>GetStudentListAsync(GetStudentInput getStudentInput)
        {
            //var totalCount = await _appletManager.GetCountAsync(getStudentInput.FilterText);
            //var items = await _appletManager.GetPageLisAsync(getStudentInput.FilterText,getStudentInput.Sorting,getStudentInput.MaxResultCount,getStudentInput.SkipCount);
            //List<StudentDto> studentItems = new List<StudentDto>();
            //return new PagedResultDto<StudentDto>
            //{
            //    TotalCount = totalCount,
            //    Items = studentItems,
            //};
            throw new NotImplementedException();
        }
        public async Task<StudentDto>GetStudentAsync(Guid id)
        {
            //var app = await _appletManager.GetByIdAsync(id);
            //return ToStudentDto(app);
            throw new NotImplementedException();
        }
        public  Task<StudentDto>CreateStudentAsync(StudentCreateDto input)
        {
            //Applet app = ToAppletAsync(input);
            //var insert = await _appletManager.CreateAsync(app);
            //StudentDto result  = new StudentDto();
            //return result;
            StudentDto studentDto = new StudentDto();
            studentDto.Address = "123456";
            return Task.FromResult(studentDto);

        }
        public  Task<StudentDto>UpdateStudentAsync(StudentUpdateDto input)
        {
            //Applet app = ToAppletAsync(input);
            //var update = await _appletManager.UpdateAsync(input.Id,app);
            //var result = ToStudentDto(app);
            //return result;
            throw new NotImplementedException();
        }
        public Task DeleteStudentAsync(Guid id)
        {
            //return _appletManager.Delete(id);
            throw new NotImplementedException();
        }
        //private Applet ToAppletAsync(StudentCreateDto input)
        //{
        //    Applet app = new Applet();           
        //    app.IdNumber = input.IdNumber;
        //    app.Address = input.Address;
        //    app.City = input.City;
        //    app.Origin = input.Origin;
        //    app.Master = input.Master;
        //    app.Province = input.Province;
        //    app.Birth = input.Birth;
        //    app.Area = input.Area;
        //    app.Grade = input.Grade;
        //    app.School = input.School;
        //    app.SchoolSystem = input.SchoolSystem;
        //    app.Phone = input.Phone;
        //    app.Image = input.Image;
        //    app.Age = input.Age;
        //    return app;
        //}

        //private StudentDto ToStudentDto(Applet app)
        //{
        //    StudentDto student = new StudentDto();
        //    student.Id = app.Id;
        //    student.IdNumber = app.IdNumber;
        //    student.Address = app.Address;
        //    student.City = app.City;
        //    student.Origin = app.Origin;
        //    student.Master = app.Master;
        //    student.Province = app.Province;
        //    student.Birth = app.Birth;
        //    student.Area = app.Area;
        //    student.Grade = app.Grade;
        //    student.School = app.School;
        //    student.SchoolSystem = app.SchoolSystem;
        //    student.Phone = app.Phone;
        //    student.Image = app.Image;
        //    student.Age = app.Age;
        //    return student;
            
        //}
    }
}
